/**
 * Created by Administrator on 2025/5/7.
 * */
#ifndef AIE2EMONITOR_ERA
#define AIE2EMONITOR_ERA

#include "TaskModule.h"
#include "../GlobalParameters.h"
#include <mutex>
#include <thread>
#include <zmq.hpp>
#include <string>
#include "../include/zy_net.h"

extern "C" BaseObject *createAIE2EMonitor();
extern "C" void destroyAIE2EMonitor(BaseObject *p);

class AIE2EMonitor : public TaskModule {
public:
AIE2EMonitor();

~AIE2EMonitor();

void onCompute(buffer_table_t *input, buffer_table_t *output) override;

private:
    zmq::context_t context;
    std::string topicAddr = "tcp://192.168.1.115:6001";
    std::string topicName = "MainController";
    zmq::socket_t sub;
    int prevStep;
    bool clearOutput1;
};

#endif //TASK1_ERA
